#include "cocos2d.h"
#include "cocos-ext.h"
#include "Cloud.h"
USING_NS_CC;
USING_NS_CC_EXT;

Cloud::Cloud()
{
	initWithFile("cloud.png");
}

// Di chuyen dam may sang trai 1 doan duoc dinh nghia bang hang so kCloudDistancePeerMove
void Cloud::fMoveLeft()
{
	visibleSize = CCDirector::sharedDirector()->getVisibleSize();
	CCLog("Cloud move to Left");
	CCActionInterval* goTo = CCMoveBy::create(kCloudSpeed,ccp( - 200,0));
	CCSequence* seq = CCSequence::create(goTo, NULL);
    runAction(seq);
}
// Di chuyen dam may sang phai 1 doan duoc dinh nghia bang hang so kCloudDistancePeerMove
void Cloud::fMoveRight()
{
	visibleSize = CCDirector::sharedDirector()->getVisibleSize();
	CCLog("Cloud move to Right");
	CCActionInterval* goTo = CCMoveBy::create(kCloudSpeed,ccp(200,0));
	CCSequence* seq = CCSequence::create(goTo, NULL);
    runAction(seq);
}